package com.ruoyi.system.mapper;

import java.util.List;

import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.system.domain.request.realtimevideo.GetDeviceInfoParam;
import com.ruoyi.system.domain.RealtimePositioning;
import com.ruoyi.system.domain.VehicleManagement;
import com.ruoyi.system.domain.vo.common.ComDvoName;
import org.apache.ibatis.annotations.Param;

/**
 * 车辆管理Mapper接口
 * 
 * @author wp
 * @date 2023-08-10
 */
public interface VehicleManagementMapper extends BaseMapper<VehicleManagement> {

    public List<VehicleManagement> list(VehicleManagement vehicleManagement);

    public VehicleManagement get(Long id);

    /**
     * 获取过期车辆数量
     * @param model
     * @return
     */
    int getExpireVehicleCount(VehicleManagement model);

    /**
     * 根据车牌号获取车辆
     * @param numberPlate
     * @return
     */
    @DataScope
    List<VehicleManagement> listByNumberPlate(JSONObject param);

    /**
     * 查询已绑定车载设备的车辆集合
     * @return
     */
    @DataScope
    List<VehicleManagement> listBindVehicle(VehicleManagement vehicleManagement);

    /**
     * 根据公司查所属车辆或者根据车辆查所属公司
     */
    List<ComDvoName> listCompanyOrVehicle(GetDeviceInfoParam param);

    /**
     * 根据设备号查询车辆定位信息
     */
    RealtimePositioning getPositionByDeviceId(String deviceId);

    /**
     * 地图车辆列表
     * @return
     */
    List<VehicleManagement> listMapVehicle(VehicleManagement vehicleManagement);

    /**
     * 根据设备号获取监管对象id及名称
     * @return
     */
    VehicleManagement getVehicleIdAndNumberPlate(String deviceId);
}
